package com.zxl.designpattern.structure.bridge;

/**
 * @author zxl
 * @version 1.0
 * @description 桥接模式-具体实现化角色-休闲旅行
 * @date 2025/6/1 14:22
 */
public class LeisureTravel extends TravelPlan {
    // 目的地
    private String destination;

    public LeisureTravel(Transport transport, String destination) {
        super(transport);
        this.destination = destination;
    }

    @Override
    public void execute() {
        System.out.println("休闲旅行计划:");
        transport.move("家", destination);
        System.out.println("游览景点、放松身心");
        transport.move(destination, "家");
    }
}